<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>详情</title>
    <link rel="stylesheet" href="/shop/shop.css" />

</head>
<body>
    <div class="container">
        <?php
            require_once("userTip.php");
        ?>
        <h2>订单: <?= $_REQUEST["no"]?></h2>
        <table class="detail" >
            <thead>
                <tr>
                    <td>商品编号</td>
                    <td>商品名称</td>
                    <td>图片</td>
                    <td>单价</td>
                    <td>商品数量</td>
                    <td>金额</td>
                </tr>
            </thead>
            <tbody>
                <?php
                    require_once("selectDetail.php");
                    foreach ($detailArr as $key => $detail) {
                        echo "<tr>
                            <td>{$detail['p_id']}</td>
                            <td>{$detail['p_name']}</td>
                            <td>
                                <img src=\"{$detail['p_image_url']}\" alt=\"no image\">
                            </td>
                            <td>￥ {$detail['d_price']}</td>
                            <td>{$detail['d_num']}</td>
                            <td>￥ {$detail['d_total']}</td>
                        </tr>";
                    }
                ?>
            </tbody>
        </table>
    </div>
</body>
</html>
